{% extends 'back/index.html' %}

{% block content %}
    <div class="rt_content">
        <div class="page_title">
            <h2 class="fl">添加商品</h2>
            <a href="{% url 'products_list' %}" class="fr top_rt_btn">返回产品列表</a>
        </div>
        <section>
            <div class="portlet-body form" style="margin-top: 30px ;">
                <form action="/products_add/" class="form-horizontal" method="post" enctype="multipart/form-data">
                    <div class="form-body">
                        <div class="form-group">
                            <label class="col-md-2 control-label">商品名称：</label>
                            <div class="col-md-4">
                                <input type="text" class="form-control" name="name" required="required"
                                       placeholder="商品名称..."/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">品牌：</label>
                            <div class="col-md-4">
{#                                <input type="text" class="form-control" name="brand" required="required"#}
{#                                       placeholder="品牌..."/>#}
                                <select class="form-control" name="brand">
                                    <option>选择品牌</option>
                                    <option value="星海">星海</option>
                                    <option value="雅马哈">雅马哈</option>
                                    <option value="珠江">珠江</option>
                                    <option value="海伦">海伦</option>
                                    <option value="凤玲">凤玲</option>
                                    <option value="其他">其他</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">乐器种类：</label>
                            <div class="col-md-4">
                                <select class="form-control" name="category">
                                    <option>选择种类</option>
                                    <option value="吉他">吉他</option>
                                    <option value="小提琴">小提琴</option>
                                    <option value="钢琴">钢琴</option>
                                    <option value="萨克斯">萨克斯</option>
                                    <option value="架子鼓">架子鼓</option>
                                    <option value="其他">其他</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">商品型号：</label>
                            <div class="col-md-4">
                                <input type="text" class="form-control" name="type" required="required"
                                       placeholder="商品型号..."/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">商品颜色：</label>
                            <div class="col-md-4">
                                <input type="text" class="form-control" name="color" required="required"
                                       placeholder="商品颜色..."/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">商品原价：</label>
                            <div class="col-md-4">
                                <input type="text" class="form-control" name="old_price" required="required"
                                       placeholder="单位：元"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">商品现价：</label>
                            <div class="col-md-4">
                                <input type="text" class="form-control" name="new_price" required="required"
                                       placeholder="单位：元"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">现有库存：</label>
                            <div class="col-md-4">
                                <input type="text" class="form-control" name="stock" required="required"
                                       placeholder="现有库存"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">销售状态：</label>
                            <div class="col-md-4">
                                <select class="form-control" name="status">
                                    <option>选择状态</option>
                                    <option value="0">未上架</option>
                                    <option value="1">上架中</option>
                                    <option value="2">热销</option>
                                    <option value="3">缺货</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">商品照片: </label>
                            <div class="col-md-8">
                                <input id='picture' type="file" name="pictures" multiple>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label">商品介绍：</label>
                            <div class="col-md-8">
                                <textarea type="text" class="form-control" name="introduction" required="required"
                                          placeholder="不多于200字..." rows="4"></textarea>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-2 control-label"></label>
                            <div class="col-md-4">
                                <span class="item_name" style="width:120px;"></span>
                                <input type="submit" style="float: left" class="link_btn"/>
                            </div>
                        </div>
                    </div>
                </form>
            </div>

        </section>
    </div>

    <script>
        (function ($) {
            $(window).load(function () {
                $('#drop1').collapse('show');
                $('#1-2').addClass('active');
            });
        })(jQuery);
    </script>
{% endblock %}
